<section class="material-half-bg">
  <div class="cover"></div>
</section>
<section class="login-content">
  <div class="login-box">
<form  #securityForm="ngForm" class="login-form" >
  <h3 class="login-head"><i class="fa fa-lg fa-fw fa-lock"></i>修改密码</h3>
  <div class="form-group">
    <label class="control-label">旧密码</label>
    <input class="form-control" type="password" name="password" required [(ngModel)] ="updateUser.mima" placeholder="旧密码">
    <div *ngIf="messages.password" class="red"> {{messages.password}}</div>
  </div>
  <div class="form-group">
    <label class="control-label">新密码</label>
    <input class="form-control" type="password" placeholder="密码" [(ngModel)] ="updateUser.address" name="newPassword"
           required pattern="(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}">
     <div *ngIf="messages.newPassword" class="red">{{messages.newPassword}}</div>
  </div>
  <div class="form-group">
    <label class="control-label">确定密码</label>
    <input class="form-control"  type="password" placeholder="确认密码"  [pattern]="'^'+updateUser.address+'$'" required [(ngModel)] ="updateUser.confirmPassword" name="confirmPassword">
     <div *ngIf=" messages.confirmPassword" class="red">{{messages.confirmPassword}}</div>
  </div>
  <div class="form-group btn-container text-center">
    <button class="btn btn-primary mr-3" (click)="onSubmit()">确认</button>
    <button class="btn btn-secondary" (click)="return()">返回</button>
  </div>
</form>
  </div>
<!-- </section> -->
